package com.example.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.blog.pojo.LoginRequest;
import com.example.blog.pojo.Result;
import com.example.blog.pojo.User;
import com.example.blog.pojo.UserInfo;
import org.apache.poi.ss.formula.functions.T;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface UserService extends IService<User> {
    Result<T> login(LoginRequest loginRequest, HttpServletResponse response);


    Result<String> QRCodeLogin(Integer userId, HttpServletResponse response);

    Result<T> outLogin(String token, HttpServletResponse response);

    Result<T> tokenCount();


    Result<T> register(User user);

    Result<User> getUserById(int id);


    User getByUserName(String username);

    Result<T> updateUserRecord(User user, String token);


    Result<T> deleteUserRecord(int id,String token);

    Result<UserInfo> queryCurrentUserInfo(String token);

    List<User> getAllUsers();
}
